package com.lyl.appinfo.biz;

import com.lyl.appinfo.dao.BackendUserDao;
import com.lyl.appinfo.entity.BackendUserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BackendUserBizImpl implements BackendUserBiz {

    @Autowired
    BackendUserDao dao;


    @Override
    public BackendUserEntity login(String userCode, String upwd) {
        BackendUserEntity userEntity = dao.selectUserByUserCode(userCode);
        if (userEntity == null)
            return null;
        if (upwd.equals(userEntity.getUserpassword())) {
            return userEntity;
        }
        return null;
    }
}
